package com.zyk.config;

import javax.sql.DataSource;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.alibaba.druid.pool.DruidDataSource;
@Configuration
public class DruidConfig {
	@Bean
	@ConfigurationProperties(prefix="spring.datasource")//将远程仓库的配置注入数据源
	@RefreshScope
	public DataSource druid() {
		return new DruidDataSource();
	}
}
